<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j">

    <ui:composition>
        <rich:modalPanel id="cadastro-cargo-modal" autosized="true" moveable="false" resizeable="false">
            <f:facet name="header">
                <h:outputText value="Cadastrar um novo cargo"/>
            </f:facet>
            <f:facet name="controls">
                <h:panelGroup>
                    <h:form>
                        <a4j:commandLink>
                            <h:graphicImage id="hidelink" value="/img/close.png" border="0" />
                            <rich:componentControl for="cadastro-cargo-modal" operation="hide" event="onclick" />
                        </a4j:commandLink>
                    </h:form>
                </h:panelGroup>
            </f:facet>

            <a4j:region>
                <h:form id="cadastro-cargo-modal-from">
                    <h:panelGrid columns="2">
                        nome:<h:inputText class="input" value="#{AdministrarCargosMB.cargo.nome}" />
                        função:<h:inputTextarea class="input" value="#{AdministrarCargosMB.cargo.funcao}" />
                    </h:panelGrid>
                    <a4j:commandButton value="cadastrar" action="#{AdministrarCargosMB.cadastrarCargo}" reRender="tabela-cargos" >
                        <rich:componentControl for="cadastro-cargo-modal" operation="hide" event="onclick" />
                    </a4j:commandButton>
                </h:form>
            </a4j:region>
        </rich:modalPanel>
    </ui:composition>
</html>

